import 'package:get/get.dart';
import 'package:get/get_connect.dart';
import 'package:school_assistant_m/utils/base_api.dart';

class CourseApi extends BaseApi{
  ///  获取课程信息请求
  Future<Map<String,dynamic>> getScoreList() async {
    Response response = await get('/score/');
    print(response.body);
    return response.body;
  }

  ///  添加课程信息请求
  Future<Map<String,dynamic>> addCourse(Map courseForm) async {
    Response response = await post('/course/',courseForm);
    print('0000000000-----------------000000000000');
    print(response);
    print(response.body);
    print(response.statusCode);
    return response.body;
  }

  ///根据id寻找课程
  Future<Map<String,dynamic>> getScoreById(id) async {
    Response response = await get('/score/' + id.toString() + '/');
    print(response.body);
    return response.body;
  }

}